//
//  BMAGeDan.m
//  LZMusicPlayer
//
//  Created by wulanzhou on 2016/11/1.
//  Copyright © 2016年 wulanzhou. All rights reserved.
//

#import "BMAGeDan.h"
#import "NSString+CZExtend.h"

@implementation BMAGeDan


/**
 * 歌单分类
 * @return
 */
- (NSString *) geDanCategory{
    NSMutableString *sb = [[NSMutableString alloc] initWithString:[self baseURLString]];
    [sb appendString:@"&method=baidu.ting.diy.gedanCategory"];
    return sb;
}

/**
 * 热门歌单
 * @param num
 * @return
 */
- (NSString *) hotGeDan:(int) num{
    
    NSMutableString *sb = [[NSMutableString alloc] initWithString:[self baseURLString]];
    [sb appendString:@"&method=baidu.ting.diy.getHotGeDanAndOfficial"];
    [sb appendFormat:@"&num=%d",num];
    return sb;
}

/**
 * 歌单
 * @param pageNo	页码
 * @param pageSize	每页数量
 * @return
 */
- (NSString *) geDan:(int) pageNo pageSize:(int) pageSize{
    
    NSMutableString *sb = [[NSMutableString alloc] initWithString:[self baseURLString]];
    [sb appendString:@"&method=baidu.ting.diy.gedan"];
    [sb appendFormat:@"&page_no=%d",pageNo];
    [sb appendFormat:@"&page_size=%d",pageSize];
    return sb;
}


/**
 * 包含标签的歌单
 * @param tag	标签名
 * @param pageNo	页码
 * @param pageSize	每页数量
 * @return
 */
- (NSString *) geDanByTag:(NSString*)tag pageNo:(int)pageNo pageSize:(int)pageSize{
    
    NSMutableString *sb = [[NSMutableString alloc] initWithString:[self baseURLString]];
    [sb appendString:@"&method=baidu.ting.diy.search"];
    [sb appendFormat:@"&page_no=%d",pageNo];
    [sb appendFormat:@"&page_size=%d",pageSize];
    [sb appendFormat:@"&query=%@",[tag URLEncode]];
    return sb;
}

/**
 * 歌单信息和歌曲
 * @param listid	歌单id
 * @return
 */
- (NSString *) geDanInfo:(NSString*) listid{
    NSMutableString *sb = [[NSMutableString alloc] initWithString:[self baseURLString]];
    [sb appendString:@"&method=baidu.ting.diy.gedanInfo"];
    [sb appendFormat:@"&listid=%@",listid];

    return sb;
}

@end
